﻿/*
 * Erstellt mit SharpDevelop.
 * Benutzer: Kai Patrick
 * Datum: 18.03.2008
 * Zeit: 16:45
 * 
 * Sie können diese Vorlage unter Extras > Optionen > Codeerstellung > Standardheader ändern.
 */

using System;
using System.Drawing;
using System.Windows.Forms;

namespace Gamadus.Designer
{
	/// <summary>
	/// Description of EventSelectorForm.
	/// </summary>
	public partial class EventSelectorForm : Form
	{
		static EventType selectedType;
		public EventSelectorForm()
		{
			//
			// The InitializeComponent() call is required for Windows Forms designer support.
			//
			InitializeComponent();
			selectedType = EventType.None;
		}
		
		/// <summary>
		/// Shows a new selector dialog
		/// </summary>
		/// <returns>The selected event type or EventType.None if cancelled</returns>
		public static EventType ShowSelectorDialog()
		{
			EventSelectorForm form = new EventSelectorForm();
			form.ShowDialog();
			form.Dispose();
			return selectedType;
		}
		
		#region Button Click Events
		void ButtonCancelClick(object sender, EventArgs e)
		{
			this.Close();
		}
		
		void ButtonCreateClick(object sender, EventArgs e)
		{
			selectedType = EventType.Create;
			this.Close();
		}
		
		void ButtonStepClick(object sender, EventArgs e)
		{
			selectedType = EventType.Step;
			this.Close();
		}
		
		void ButtonDrawClick(object sender, EventArgs e)
		{
			selectedType = EventType.Draw;
			this.Close();
		}
		#endregion
	}
}
